package com.xmy.cultivate.listeners;

import com.xmy.cultivate.constants.MqConstants;
import com.xmy.cultivate.entity.ChangeSchoolDetail;
import com.xmy.cultivate.entity.RecordCourse;
import com.xmy.cultivate.service.IRecordCourseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.text.ParseException;

@Slf4j
@Component
public class BuckleHouseListener {

    @Autowired
    IRecordCourseService iRecordCourseService;

//    @RabbitListener(bindings = @QueueBinding(
//            value = @Queue(name = MqConstants.QUEUE_BUCKLE_HOUSE_Q1, durable = "true"),
//            exchange = @Exchange(name = MqConstants.EXCHANGE_BUCKLE_HOUSE_FANOUT, type = ExchangeTypes.FANOUT)
//    ))
//    public void buckleHouseLs(RecordCourse recordCourse) throws InterruptedException, ParseException {
//        iRecordCourseService.recordAction(recordCourse);
//    }
}
